//
//  Connection.h
//  Reminders
//
//  Created by Nearsoft User on 8/2/12.
//  Copyright (c) 2012 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "Reminder.h"
#import "DateStrings.h"
#import <sqlite3.h>

@interface Connection : NSObject {
    sqlite3   *database;
    DateStrings *dateString;
}

@property (nonatomic, retain) Reminder *reminder;

- (id)init;
- (void)editReminderFromDatabase:(Reminder *)reminderToEdit;
- (void)deleteReminderFromDatabase:(NSInteger)pk;
- (NSInteger)insertNewReminderIntoDatabase:(Reminder *) aReminder;
- (NSMutableArray *)getAllReminders:(BOOL)done;
- (Reminder *)getSingleReminder:(NSInteger)pk;
- (void)updateReminderCompleteFromDatabase:(NSInteger)pk;
- (void)updateReminderDateFromDatabase:(NSInteger)pk;
- (void)initializeDatabase;
- (void)copyDatabaseIfNeeded;
- (void)saveReminderIntoDatabase:(Reminder *)aReminder;

@end